package action;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

import basic.PageInfo;
import basic.QuerySet;
import basic.ResultSet;
import basic.SortInfo;
import common.BaseAction;
import entities.TFunction;
import entities.TNotice;
import entities.TOperator;
import entities.TOxf;
import entities.TResource;
import entities.TRole;
import entities.TRxf;
import interfaces.IFunctionService;
import interfaces.INoticeService;
import interfaces.IOperatorService;
import interfaces.IOxfService;
import interfaces.IResourceService;
import interfaces.IRoleService;
import interfaces.IRxfService;
import net.sf.json.JSONArray;
import util.ParameterUtil;
import utils.AesUtil;
import utils.StringUtil;
import views.VOperatorFunction;
import views.VOperatorResource;
import views.VRoleFunction;

public class RofAction extends BaseAction {
	/**
	 * 
	 */
	private static final long serialVersionUID = 7507534255609348887L;

	private IOperatorService operatorService;
	private IRoleService roleService;
	private IFunctionService functionService;
	private IOxfService oxfService;
	private IRxfService rxfService;
	private IResourceService resourceService;
	private INoticeService noticeService;

	private TOperator operatorBean;
	private List<TOperator> operatorList;
	private String optNo;
	private String catNo;
	private String optId;
	private String optName;
	private String optPwdEd;
	private String optPwd;
	private String optPwdRe;
	private String optPicture;
	private String optPoint;
	private String optState;
	private Date optDate;
	private String optRemark;

	private TRole roleBean;
	private List<TRole> roleList;
	private String rolNo;
	private String rolName;
	private String rolState;
	private Date rolDate;
	private String rolRemark;

	private TFunction functionBean;
	private List<TFunction> functionList;
	private String funNo;
	private String funName;
	private String funDad;
	private String funRedirect;
	private Double funSeq;
	private String funEnable;
	private String funIcon;
	private String funState;
	private Date funDate;
	private String funRemark;
	private String funTree;

	private TOxf oxfBean;
	private List<TOxf> oxfList;
	private VOperatorFunction operatorFunctionBean;
	private List<VOperatorFunction> operatorFunctionList;
	private TRxf rxfBean;
	private List<TRxf> rxfList;
	private VRoleFunction roleFunctionBean;
	private List<VRoleFunction> roleFunctionList;

	private TResource resBean;
	private List<TResource> resList;
	private VOperatorResource operatorResourceBean;
	private List<VOperatorResource> operatorResourceList;
	private String resNo;
	private String resName;
	private String resAction;
	private String resMethod;
	private String resAccess;
	private String resTarget;
	private String resType;
	private String resTerm;
	private String resState;
	private Date resDate;
	private String resRemark;

	private Date optDateTop;
	private Date optDateEnd;
	private Date rolDateTop;
	private Date rolDateEnd;
	private Date funDateTop;
	private Date funDateEnd;
	private Date resDateTop;
	private Date resDateEnd;

	public String editoperator() throws Exception {
		operatorBean = operatorService.fetch(optNo);
		if (StringUtil.isEmpty(operatorBean)) {
			operatorBean = new TOperator();
			operatorBean.setOptNo(StringUtil.guid());
			operatorBean.setCatNo("002001");
			operatorBean.setOptPoint("1");
			operatorBean.setOptState("1");
		}
		return SUCCESS;
	}

	public String saveoperator() throws Exception {
		if (!optPwd.equals(optPwdRe)) {
			addActionError("两次输入的密码不一致");
			return INFO;
		}

		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("optId", optId);
		if (operatorService.contain(paramMap)) {
			addActionError("该操作员工号已经存在");
			return INFO;
		}
		operatorBean = new TOperator();
		operatorBean.setOptNo(optNo);
		operatorBean.setCatNo(catNo);
		operatorBean.setOptId(optId);
		operatorBean.setOptName(optName);
		operatorBean.setOptPwd(AesUtil.AES_Encrypt(AesUtil.KEY, optPwd));
		operatorBean.setOptPicture("/image/head/default.jpg");
		operatorBean.setOptPoint(optPoint);
		operatorBean.setOptDate(new Date());
		operatorBean.setOptState(optState);
		operatorBean.setOptRemark(optRemark);
		operatorService.persist(operatorBean);

		TNotice noticeBean = new TNotice();
		noticeBean.setNtcNo(StringUtil.guid());
		noticeBean.setOptId(optId);
		noticeBean.setNtcInfo("提醒:操作员[" + optName + "] 首次登录后请先修改密码.");
		noticeBean.setNtcRead("0");
		noticeBean.setNtcState("1");
		noticeBean.setNtcDate(new Date());
		noticeBean.setNtcRemark("");
		noticeService.persist(noticeBean);
		return SUCCESS;
	}

	public String editoperatorpassword() throws Exception {
		return SUCCESS;
	}

	public String saveoperatorpassword() throws Exception {
		operatorBean = operatorService.fetch(optNo);
		if (StringUtil.isEmpty(optPwdEd)) {
			addActionError("原密码不能为空并且长度不小于8位");
			return INFO;
		}
		if (StringUtil.isEmpty(optPwd) || optPwd.length() < 8) {
			addActionError("新密码不能为空并且长度不小于8位");
			return INFO;
		}
		if (StringUtil.isEmpty(optPwdRe) || optPwdRe.length() < 8) {
			addActionError("再次输入的密码不能为空并且长度不小于8位");
			return INFO;
		}
		if (!operatorBean.getOptPwd().equals(AesUtil.AES_Encrypt(AesUtil.KEY, optPwdEd))) {
			addActionError("输入密码和原密码不一致");
			return INFO;
		}
		if (!optPwd.equals(optPwdRe)) {
			addActionError("两次输入的密码不一致");
			return INFO;
		}
		operatorBean = new TOperator();
		operatorBean.setOptNo(optNo);
		operatorBean.setOptPwd(AesUtil.AES_Encrypt(AesUtil.KEY, optPwd));
		operatorService.persist(operatorBean);
		return SUCCESS;
	}

	public String moveoperator() throws Exception {
		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("optNo", optNo);
		oxfService.expunge(paramMap);
		operatorService.remove(optNo);
		return SUCCESS;
	}

	public String listoperator() throws Exception {
		QuerySet<Object> querySet = new QuerySet<Object>();

		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("optId", optId);
		paramMap.put("optName", optName);
		paramMap.put("optState", optState);
		paramMap.put("optDate", ParameterUtil.dateCombin(optDateTop, optDateEnd));

		SortInfo sortInfo = new SortInfo();
		sortInfo.setSortField((StringUtil.isEmpty(sortField)) ? "optDate" : sortField);
		sortInfo.setSortOrder(sortOrder);

		querySet.setPageInfo(new PageInfo(pageIndex, pageSize));
		querySet.setSortInfo(sortInfo);
		querySet.setParamMap(paramMap);

		ResultSet<TOperator> resultSet = operatorService.search(querySet);
		operatorList = resultSet.getResultList();
		pageInfo = resultSet.getPageInfo();
		return SUCCESS;
	}

	public String ajaxoperator() throws Exception {
		QuerySet<Object> querySet = new QuerySet<Object>();

		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("optId", optId);
		paramMap.put("optName", optName);
		paramMap.put("optState", optState);
		paramMap.put("optDate", ParameterUtil.dateCombin(optDateTop, optDateEnd));

		SortInfo sortInfo = new SortInfo();
		sortInfo.setSortField((StringUtil.isEmpty(sortField)) ? "optDate" : sortField);
		sortInfo.setSortOrder(sortOrder);

		querySet.setPageInfo(new PageInfo(1, Integer.MAX_VALUE));
		querySet.setSortInfo(sortInfo);
		querySet.setParamMap(paramMap);

		ResultSet<TOperator> resultSet = operatorService.search(querySet);
		operatorList = resultSet.getResultList();

		HttpServletResponse response = ServletActionContext.getResponse();
		response.setContentType("text/html;charset=UTF-8");
		response.getWriter().print(JSONArray.fromObject(operatorList).toString());
		return SUCCESS;
	}

	public String roleEdit() throws Exception {
		roleBean = roleService.fetch(rolNo);
		if (StringUtil.isEmpty(roleBean)) {
			roleBean = new TRole();
			roleBean.setRolNo(StringUtil.guid());
			roleBean.setRolState("1");
		}
		return SUCCESS;
	}

	public String roleSave() throws Exception {
		roleBean = new TRole();
		roleBean.setRolNo(rolNo);
		roleBean.setRolName(rolName);
		roleBean.setRolState(rolState);
		roleBean.setRolDate(new Date());
		roleBean.setRolRemark(rolRemark);
		roleService.persist(roleBean);
		return SUCCESS;
	}

	public String roleMove() throws Exception {
		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("rolNo", rolNo);
		rxfService.expunge(paramMap);
		roleService.remove(rolNo);
		return SUCCESS;
	}

	public String roleList() throws Exception {
		QuerySet<Object> querySet = new QuerySet<Object>();

		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("rolName", rolName);
		paramMap.put("rolState", rolState);
		paramMap.put("rolDate", ParameterUtil.dateCombin(rolDateTop, rolDateEnd));

		SortInfo sortInfo = new SortInfo();
		sortInfo.setSortField((StringUtil.isEmpty(sortField)) ? "rolDate" : sortField);
		sortInfo.setSortOrder(sortOrder);

		querySet.setPageInfo(new PageInfo(pageIndex, pageSize));
		querySet.setSortInfo(sortInfo);
		querySet.setParamMap(paramMap);

		ResultSet<TRole> resultSet = roleService.search(querySet);
		roleList = resultSet.getResultList();
		pageInfo = resultSet.getPageInfo();
		return SUCCESS;
	}

	public void roleAjax() throws Exception {
		QuerySet<Object> querySet = new QuerySet<Object>();

		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("rolName", rolName);
		paramMap.put("rolState", rolState);
		paramMap.put("rolDate", ParameterUtil.dateCombin(rolDateTop, rolDateEnd));

		SortInfo sortInfo = new SortInfo();
		sortInfo.setSortField((StringUtil.isEmpty(sortField)) ? "rolDate" : sortField);
		sortInfo.setSortOrder(sortOrder);

		querySet.setPageInfo(new PageInfo(1, Integer.MAX_VALUE));
		querySet.setSortInfo(sortInfo);
		querySet.setParamMap(paramMap);

		ResultSet<TRole> resultSet = roleService.search(querySet);
		roleList = resultSet.getResultList();

		HttpServletResponse response = ServletActionContext.getResponse();
		response.setContentType("text/html;charset=UTF-8");
		response.getWriter().print(JSONArray.fromObject(roleList).toString());
	}

	public String editfunction() throws Exception {
		functionBean = functionService.fetch(funNo);
		if (StringUtil.isEmpty(functionBean)) {
			functionBean = new TFunction();
			functionBean.setFunNo(StringUtil.guid());
			functionBean.setFunDad("-1");
			functionBean.setFunIcon("/image/icon/1.jpg");
			functionBean.setFunEnable("1");
			functionBean.setFunState("1");
		}
		return SUCCESS;
	}

	public String savefunction() throws Exception {
		functionBean = new TFunction();
		functionBean.setFunNo(funNo);
		functionBean.setFunName(funName);
		functionBean.setFunDad(funDad);
		functionBean.setFunRedirect(funRedirect);
		functionBean.setFunSeq(funSeq);
		functionBean.setFunEnable(funEnable);
		functionBean.setFunIcon(funIcon);
		functionBean.setFunState(funState);
		functionBean.setFunDate(new Date());
		functionBean.setFunRemark(funRemark);
		functionService.persist(functionBean);
		return SUCCESS;
	}

	public String movefunction() throws Exception {
		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("funNo", funNo);
		oxfService.expunge(paramMap);
		rxfService.expunge(paramMap);
		functionService.remove(funNo);
		return SUCCESS;
		
	}

	public String listfunction() throws Exception {
		QuerySet<Object> querySet = new QuerySet<Object>();

		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("funName", funName);
		paramMap.put("funDad", funDad);
		paramMap.put("funState", funState);
		paramMap.put("funDate", ParameterUtil.dateCombin(funDateTop, funDateEnd));

		SortInfo sortInfo = new SortInfo();
		sortInfo.setSortField((StringUtil.isEmpty(sortField)) ? "funDate" : sortField);
		sortInfo.setSortOrder(sortOrder);

		querySet.setPageInfo(new PageInfo(pageIndex, pageSize));
		querySet.setSortInfo(sortInfo);
		querySet.setParamMap(paramMap);

		ResultSet<TFunction> resultSet = functionService.search(querySet);
		functionList = resultSet.getResultList();
		pageInfo = resultSet.getPageInfo();
		return SUCCESS;
	}

	public void ajaxfunction() throws Exception {
		QuerySet<Object> querySet = new QuerySet<Object>();

		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("funDad", funDad);

		SortInfo sortInfo = new SortInfo();
		sortInfo.setSortField((StringUtil.isEmpty(sortField)) ? "funNo" : sortField);
		sortInfo.setSortOrder(new Boolean(true));

		querySet.setPageInfo(new PageInfo(1, Integer.MAX_VALUE));
		querySet.setSortInfo(sortInfo);
		querySet.setParamMap(paramMap);

		ResultSet<TFunction> resultSet = functionService.search(querySet);
		functionList = resultSet.getResultList();

		HttpServletResponse response = ServletActionContext.getResponse();
		response.setContentType("text/html;charset=UTF-8");
		response.getWriter().print(JSONArray.fromObject(functionList).toString());
	}

	public String editoxf() throws Exception {
		operatorBean = operatorService.fetch(optNo);

		QuerySet<Object> querySet = new QuerySet<Object>();
		querySet.setPageInfo(new PageInfo(1, Integer.MAX_VALUE));

		ResultSet<TFunction> resultSet = functionService.search(querySet);
		functionList = resultSet.getResultList();
		funTree = JSONArray.fromObject(functionList).toString();
		return SUCCESS;
	}

	public void saveoxf() throws Exception {
		oxfBean = new TOxf();
		oxfBean.setOptNo(optNo);
		oxfBean.setFunNo(funNo);
		oxfService.persist(oxfBean);
	}

	public void moveoxf() throws Exception {
		oxfBean = new TOxf();
		oxfBean.setOptNo(optNo);
		oxfBean.setFunNo(funNo);
		oxfService.remove(oxfBean);
	}

	public void ajaxoxf() throws Exception {
		QuerySet<Object> querySet = new QuerySet<Object>();

		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("optNo", optNo);

		querySet.setPageInfo(new PageInfo(1, Integer.MAX_VALUE));
		querySet.setParamMap(paramMap);

		ResultSet<TOxf> resultSet = oxfService.search(querySet);
		oxfList = resultSet.getResultList();

		HttpServletResponse response = ServletActionContext.getResponse();
		response.setContentType("text/html;charset=UTF-8");
		response.getWriter().print(JSONArray.fromObject(oxfList).toString());
	}

	public String viewoxf() throws Exception {
		QuerySet<Object> querySet = new QuerySet<Object>();

		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("optId", optId);
		paramMap.put("optName", optName);
		paramMap.put("optState", optState);
		paramMap.put("optDate", ParameterUtil.dateCombin(optDateTop, optDateEnd));

		paramMap.put("funName", funName);
		paramMap.put("funDad", funDad);
		paramMap.put("funState", funState);
		paramMap.put("funDate", ParameterUtil.dateCombin(funDateTop, funDateEnd));

		SortInfo sortInfo = new SortInfo();
		sortInfo.setSortField((StringUtil.isEmpty(sortField)) ? "optId" : sortField);
		sortInfo.setSortOrder(sortOrder);

		querySet.setPageInfo(new PageInfo(pageIndex, pageSize));
		querySet.setSortInfo(sortInfo);
		querySet.setParamMap(paramMap);

		ResultSet<VOperatorFunction> resultSet = oxfService.relate(querySet);
		operatorFunctionList = resultSet.getResultList();
		pageInfo = resultSet.getPageInfo();
		return SUCCESS;
	}

	public String editrxf() throws Exception {
		roleBean = roleService.fetch(rolNo);

		QuerySet<Object> querySet = new QuerySet<Object>();
		querySet.setPageInfo(new PageInfo(1, Integer.MAX_VALUE));

		ResultSet<TFunction> resultSet = functionService.search(querySet);
		functionList = resultSet.getResultList();
		funTree = JSONArray.fromObject(functionList).toString();
		return SUCCESS;
	}

	public void saverxf() throws Exception {
		rxfBean = new TRxf();
		rxfBean.setRolNo(rolNo);
		rxfBean.setFunNo(funNo);
		rxfService.persist(rxfBean);
	}

	public void moverxf() throws Exception {
		rxfBean = new TRxf();
		rxfBean.setRolNo(rolNo);
		rxfBean.setFunNo(funNo);
		rxfService.remove(rxfBean);
	}

	public void ajaxrxf() throws Exception {
		QuerySet<Object> querySet = new QuerySet<Object>();

		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("rolNo", rolNo);

		querySet.setPageInfo(new PageInfo(1, Integer.MAX_VALUE));
		querySet.setParamMap(paramMap);

		ResultSet<TRxf> resultSet = rxfService.search(querySet);
		rxfList = resultSet.getResultList();

		HttpServletResponse response = ServletActionContext.getResponse();
		response.setContentType("text/html;charset=UTF-8");
		response.getWriter().print(JSONArray.fromObject(rxfList).toString());
	}

	public String viewrxf() throws Exception {
		QuerySet<Object> querySet = new QuerySet<Object>();

		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("rolName", rolName);
		paramMap.put("rolDate", ParameterUtil.dateCombin(rolDateTop, rolDateEnd));

		paramMap.put("funName", funName);
		paramMap.put("funDad", funDad);
		paramMap.put("funState", funState);
		paramMap.put("funDate", ParameterUtil.dateCombin(funDateTop, funDateEnd));

		SortInfo sortInfo = new SortInfo();
		sortInfo.setSortField((StringUtil.isEmpty(sortField)) ? "rolName" : sortField);
		sortInfo.setSortOrder(sortOrder);

		querySet.setPageInfo(new PageInfo(pageIndex, pageSize));
		querySet.setSortInfo(sortInfo);
		querySet.setParamMap(paramMap);

		ResultSet<VRoleFunction> resultSet = rxfService.relate(querySet);
		roleFunctionList = resultSet.getResultList();
		pageInfo = resultSet.getPageInfo();
		return SUCCESS;
	}

	// 套用角色模版
	public void saveoxr() throws Exception {
		oxfBean = new TOxf();
		oxfBean.setOptNo(optNo);
		oxfService.remove(oxfBean);

		QuerySet<Object> querySet = new QuerySet<Object>();

		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("rolNo", rolNo);

		querySet.setPageInfo(new PageInfo(1, Integer.MAX_VALUE));
		querySet.setParamMap(paramMap);

		ResultSet<TRxf> resultSet = rxfService.search(querySet);
		rxfList = resultSet.getResultList();

		for (TRxf rxf : rxfList) {
			oxfBean = new TOxf();
			oxfBean.setOptNo(optNo);
			oxfBean.setFunNo(rxf.getFunNo());
			oxfService.persist(oxfBean);
		}
	}

	public String editresource() throws Exception {
		resBean = resourceService.fetch(resNo);
		if (StringUtil.isEmpty(resBean)) {
			resBean = new TResource();
			resBean.setResNo(StringUtil.guid());
			resBean.setResState("1");
		}

		QuerySet<Object> querySet = new QuerySet<Object>();

		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("optState", "1");

		querySet.setPageInfo(new PageInfo(1, Integer.MAX_VALUE));
		querySet.setParamMap(paramMap);

		ResultSet<TOperator> resultSet = operatorService.search(querySet);
		operatorList = resultSet.getResultList();
		pageInfo = resultSet.getPageInfo();
		return SUCCESS;
	}

	public String saveresource() throws Exception {
		resBean = new TResource();
		resBean.setResNo(resNo);
		resBean.setOptNo(optNo);
		resBean.setResName(resName);
		resBean.setResAction(resAction);
		resBean.setResMethod(resMethod);
		resBean.setResAccess(resAccess);
		resBean.setResTarget(resTarget);
		resBean.setResType(resType);
		resBean.setResTerm(resTerm);
		resBean.setResDate(new Date());
		resBean.setResState(resState);
		resBean.setResRemark(resRemark);
		resourceService.persist(resBean);
		return SUCCESS;
	}

	public String moveresource() throws Exception {
		return SUCCESS;
	}

	public String viewresource() throws Exception {
		QuerySet<Object> querySet = new QuerySet<Object>();

		HashMap<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("resName", resName);
		paramMap.put("optId", optId);
		paramMap.put("optName", optName);
		paramMap.put("resState", resState);
		paramMap.put("resDate", ParameterUtil.dateCombin(resDateTop, resDateEnd));

		SortInfo sortInfo = new SortInfo();
		sortInfo.setSortField((StringUtil.isEmpty(sortField)) ? "resDate" : sortField);
		sortInfo.setSortOrder(sortOrder);

		querySet.setPageInfo(new PageInfo(pageIndex, pageSize));
		querySet.setSortInfo(sortInfo);
		querySet.setParamMap(paramMap);

		ResultSet<VOperatorResource> resultSet = resourceService.relate(querySet);
		operatorResourceList = resultSet.getResultList();
		pageInfo = resultSet.getPageInfo();
		return SUCCESS;
	}

	/////////////////////////////////

	public IOperatorService getOperatorService() {
		return operatorService;
	}

	public void setOperatorService(IOperatorService operatorService) {
		this.operatorService = operatorService;
	}

	public IRoleService getRoleService() {
		return roleService;
	}

	public void setRoleService(IRoleService roleService) {
		this.roleService = roleService;
	}

	public IFunctionService getFunctionService() {
		return functionService;
	}

	public IOxfService getOxfService() {
		return oxfService;
	}

	public void setOxfService(IOxfService oxfService) {
		this.oxfService = oxfService;
	}

	public IRxfService getRxfService() {
		return rxfService;
	}

	public void setRxfService(IRxfService rxfService) {
		this.rxfService = rxfService;
	}

	public IResourceService getResourceService() {
		return resourceService;
	}

	public void setResourceService(IResourceService resourceService) {
		this.resourceService = resourceService;
	}

	public INoticeService getNoticeService() {
		return noticeService;
	}

	public void setNoticeService(INoticeService noticeService) {
		this.noticeService = noticeService;
	}

	public TOperator getOperatorBean() {
		return operatorBean;
	}

	public void setOperatorBean(TOperator operatorBean) {
		this.operatorBean = operatorBean;
	}

	public List<TOperator> getOperatorList() {
		return operatorList;
	}

	public void setOperatorList(List<TOperator> operatorList) {
		this.operatorList = operatorList;
	}

	public String getOptNo() {
		return optNo;
	}

	public void setOptNo(String optNo) {
		this.optNo = optNo;
	}

	public String getCatNo() {
		return catNo;
	}

	public void setCatNo(String catNo) {
		this.catNo = catNo;
	}

	public String getOptId() {
		return optId;
	}

	public void setOptId(String optId) {
		this.optId = optId;
	}

	public String getOptName() {
		return optName;
	}

	public void setOptName(String optName) {
		this.optName = optName;
	}

	public String getOptPwdEd() {
		return optPwdEd;
	}

	public void setOptPwdEd(String optPwdEd) {
		this.optPwdEd = optPwdEd;
	}

	public String getOptPwd() {
		return optPwd;
	}

	public void setOptPwd(String optPwd) {
		this.optPwd = optPwd;
	}

	public String getOptPwdRe() {
		return optPwdRe;
	}

	public void setOptPwdRe(String optPwdRe) {
		this.optPwdRe = optPwdRe;
	}

	public String getOptPicture() {
		return optPicture;
	}

	public void setOptPicture(String optPicture) {
		this.optPicture = optPicture;
	}

	public String getOptPoint() {
		return optPoint;
	}

	public void setOptPoint(String optPoint) {
		this.optPoint = optPoint;
	}

	public String getOptState() {
		return optState;
	}

	public void setOptState(String optState) {
		this.optState = optState;
	}

	public Date getOptDate() {
		return optDate;
	}

	public void setOptDate(Date optDate) {
		this.optDate = optDate;
	}

	public String getOptRemark() {
		return optRemark;
	}

	public void setOptRemark(String optRemark) {
		this.optRemark = optRemark;
	}

	public TRole getRoleBean() {
		return roleBean;
	}

	public void setRoleBean(TRole roleBean) {
		this.roleBean = roleBean;
	}

	public List<TRole> getRoleList() {
		return roleList;
	}

	public void setRoleList(List<TRole> roleList) {
		this.roleList = roleList;
	}

	public String getRolNo() {
		return rolNo;
	}

	public void setRolNo(String rolNo) {
		this.rolNo = rolNo;
	}

	public String getRolName() {
		return rolName;
	}

	public void setRolName(String rolName) {
		this.rolName = rolName;
	}

	public String getRolState() {
		return rolState;
	}

	public void setRolState(String rolState) {
		this.rolState = rolState;
	}

	public Date getRolDate() {
		return rolDate;
	}

	public void setRolDate(Date rolDate) {
		this.rolDate = rolDate;
	}

	public String getRolRemark() {
		return rolRemark;
	}

	public void setRolRemark(String rolRemark) {
		this.rolRemark = rolRemark;
	}

	public TFunction getFunctionBean() {
		return functionBean;
	}

	public void setFunctionBean(TFunction functionBean) {
		this.functionBean = functionBean;
	}

	public List<TFunction> getFunctionList() {
		return functionList;
	}

	public void setFunctionList(List<TFunction> functionList) {
		this.functionList = functionList;
	}

	public String getFunNo() {
		return funNo;
	}

	public void setFunNo(String funNo) {
		this.funNo = funNo;
	}

	public String getFunName() {
		return funName;
	}

	public void setFunName(String funName) {
		this.funName = funName;
	}

	public String getFunDad() {
		return funDad;
	}

	public void setFunDad(String funDad) {
		this.funDad = funDad;
	}

	public String getFunRedirect() {
		return funRedirect;
	}

	public void setFunRedirect(String funRedirect) {
		this.funRedirect = funRedirect;
	}

	public Double getFunSeq() {
		return funSeq;
	}

	public void setFunSeq(Double funSeq) {
		this.funSeq = funSeq;
	}

	public String getFunEnable() {
		return funEnable;
	}

	public void setFunEnable(String funEnable) {
		this.funEnable = funEnable;
	}

	public String getFunIcon() {
		return funIcon;
	}

	public void setFunIcon(String funIcon) {
		this.funIcon = funIcon;
	}

	public String getFunState() {
		return funState;
	}

	public void setFunState(String funState) {
		this.funState = funState;
	}

	public Date getFunDate() {
		return funDate;
	}

	public void setFunDate(Date funDate) {
		this.funDate = funDate;
	}

	public String getFunRemark() {
		return funRemark;
	}

	public void setFunRemark(String funRemark) {
		this.funRemark = funRemark;
	}

	public String getFunTree() {
		return funTree;
	}

	public void setFunTree(String funTree) {
		this.funTree = funTree;
	}

	public TOxf getOxfBean() {
		return oxfBean;
	}

	public void setOxfBean(TOxf oxfBean) {
		this.oxfBean = oxfBean;
	}

	public List<TOxf> getOxfList() {
		return oxfList;
	}

	public void setOxfList(List<TOxf> oxfList) {
		this.oxfList = oxfList;
	}

	public VOperatorFunction getOperatorFunctionBean() {
		return operatorFunctionBean;
	}

	public void setOperatorFunctionBean(VOperatorFunction operatorFunctionBean) {
		this.operatorFunctionBean = operatorFunctionBean;
	}

	public List<VOperatorFunction> getOperatorFunctionList() {
		return operatorFunctionList;
	}

	public void setOperatorFunctionList(List<VOperatorFunction> operatorFunctionList) {
		this.operatorFunctionList = operatorFunctionList;
	}

	public TRxf getRxfBean() {
		return rxfBean;
	}

	public void setRxfBean(TRxf rxfBean) {
		this.rxfBean = rxfBean;
	}

	public List<TRxf> getRxfList() {
		return rxfList;
	}

	public void setRxfList(List<TRxf> rxfList) {
		this.rxfList = rxfList;
	}

	public VRoleFunction getRoleFunctionBean() {
		return roleFunctionBean;
	}

	public void setRoleFunctionBean(VRoleFunction roleFunctionBean) {
		this.roleFunctionBean = roleFunctionBean;
	}

	public List<VRoleFunction> getRoleFunctionList() {
		return roleFunctionList;
	}

	public void setRoleFunctionList(List<VRoleFunction> roleFunctionList) {
		this.roleFunctionList = roleFunctionList;
	}

	public TResource getResBean() {
		return resBean;
	}

	public void setResBean(TResource resBean) {
		this.resBean = resBean;
	}

	public List<TResource> getResList() {
		return resList;
	}

	public void setResList(List<TResource> resList) {
		this.resList = resList;
	}

	public VOperatorResource getOperatorResourceBean() {
		return operatorResourceBean;
	}

	public void setOperatorResourceBean(VOperatorResource operatorResourceBean) {
		this.operatorResourceBean = operatorResourceBean;
	}

	public List<VOperatorResource> getOperatorResourceList() {
		return operatorResourceList;
	}

	public void setOperatorResourceList(List<VOperatorResource> operatorResourceList) {
		this.operatorResourceList = operatorResourceList;
	}

	public String getResNo() {
		return resNo;
	}

	public void setResNo(String resNo) {
		this.resNo = resNo;
	}

	public String getResName() {
		return resName;
	}

	public void setResName(String resName) {
		this.resName = resName;
	}

	public String getResAction() {
		return resAction;
	}

	public void setResAction(String resAction) {
		this.resAction = resAction;
	}

	public String getResMethod() {
		return resMethod;
	}

	public void setResMethod(String resMethod) {
		this.resMethod = resMethod;
	}

	public String getResAccess() {
		return resAccess;
	}

	public void setResAccess(String resAccess) {
		this.resAccess = resAccess;
	}

	public String getResTarget() {
		return resTarget;
	}

	public void setResTarget(String resTarget) {
		this.resTarget = resTarget;
	}

	public String getResType() {
		return resType;
	}

	public void setResType(String resType) {
		this.resType = resType;
	}

	public String getResTerm() {
		return resTerm;
	}

	public void setResTerm(String resTerm) {
		this.resTerm = resTerm;
	}

	public String getResState() {
		return resState;
	}

	public void setResState(String resState) {
		this.resState = resState;
	}

	public Date getResDate() {
		return resDate;
	}

	public void setResDate(Date resDate) {
		this.resDate = resDate;
	}

	public String getResRemark() {
		return resRemark;
	}

	public void setResRemark(String resRemark) {
		this.resRemark = resRemark;
	}

	public Date getOptDateTop() {
		return optDateTop;
	}

	public void setOptDateTop(Date optDateTop) {
		this.optDateTop = optDateTop;
	}

	public Date getOptDateEnd() {
		return optDateEnd;
	}

	public void setOptDateEnd(Date optDateEnd) {
		this.optDateEnd = optDateEnd;
	}

	public Date getRolDateTop() {
		return rolDateTop;
	}

	public void setRolDateTop(Date rolDateTop) {
		this.rolDateTop = rolDateTop;
	}

	public Date getRolDateEnd() {
		return rolDateEnd;
	}

	public void setRolDateEnd(Date rolDateEnd) {
		this.rolDateEnd = rolDateEnd;
	}

	public Date getFunDateTop() {
		return funDateTop;
	}

	public void setFunDateTop(Date funDateTop) {
		this.funDateTop = funDateTop;
	}

	public Date getFunDateEnd() {
		return funDateEnd;
	}

	public void setFunDateEnd(Date funDateEnd) {
		this.funDateEnd = funDateEnd;
	}

	public Date getResDateTop() {
		return resDateTop;
	}

	public void setResDateTop(Date resDateTop) {
		this.resDateTop = resDateTop;
	}

	public Date getResDateEnd() {
		return resDateEnd;
	}

	public void setResDateEnd(Date resDateEnd) {
		this.resDateEnd = resDateEnd;
	}

	public void setFunctionService(IFunctionService functionService) {
		this.functionService = functionService;
	}

	

}
